/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package de.fuberlin.inf.alp4.ue2;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

/**
 *
 * @author Enni
 */
public class MyFuture extends FutureTask<MethodRequest> {

	private MethodRequest m;
	
	public MyFuture(MethodRequest m) {
		super(m);
		this.m = m;
	}

	@Override
	public MethodRequest get() throws InterruptedException, ExecutionException {
		if(m.done)
			return m;
		else
			return null;
	}

}
